package com.ruoyi.applet.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单对象 ord_order
 * @author ruoyi
 * @date 2025-01-02
 */
public class OrdOrder extends BaseEntity {
    
    private static final long serialVersionUID = 1L;
    
    /** 订单id */
    private Long id;
    
    /** 用户id */
    @Excel(name = "用户id")
    private Long wxUserId;
    
    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String consigneeName;
    
    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String consigneePhone;
    
    /** 收货地址 */
    @Excel(name = "收货地址")
    private String consigneeRegion;
    
    /** 详细地址 */
    @Excel(name = "详细地址")
    private String consigneeAddress;
    
    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal totalAmount;
    
    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;
    
    /** 应付金额 */
    @Excel(name = "应付金额")
    private BigDecimal payableAmount;
    
    /** 支付方式 */
    @Excel(name = "支付方式")
    private String paymentMethod;
    
    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;
    
    /** 支付完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "支付完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentCompletedTime;
    
    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shippingTime;
    
    /** 收货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "收货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;
    
    /** 订单状态（1-待支付，2-已支付，3-已发货，4-已完成，5-已取消） */
    @Excel(name = "订单状态", readConverterExp = "1=-待支付，2-已支付，3-已发货，4-已完成，5-已取消")
    private Integer orderStatus;
    
    /** 取消原因 */
    @Excel(name = "取消原因")
    private String cancelReason;
    
    /** 退款状态（1-未退款，2-部分退款，3-全额退款） */
    @Excel(name = "退款状态", readConverterExp = "1=-未退款，2-部分退款，3-全额退款")
    private Integer refundStatus;
    
    /** 退款金额 */
    @Excel(name = "退款金额")
    private BigDecimal refundAmount;
    
    /** 促销码 */
    @Excel(name = "促销码")
    private String promotionCode;
    
    /** 发票类型(1-不开发票，2-普通发票，3-增值税专用发票) */
    @Excel(name = "发票类型(1-不开发票，2-普通发票，3-增值税专用发票)")
    private Integer invoiceType;
    
    /** 发票信息 */
    @Excel(name = "发票信息")
    private String invoiceInfo;
    
    /** 订单单来源渠道（1-网站，2-移动端，3-API，4-其他） */
    @Excel(name = "订单单来源渠道", readConverterExp = "1=-网站，2-移动端，3-API，4-其他")
    private Integer sourceChannel;
    
    /** 删除标记（0正常，1删除） */
    private Integer delFlag;
    
    /** 订单商品 */
    List<OrdOrderCommodity> ordOrderCommodityList;
    
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getWxUserId() {
        return wxUserId;
    }
    
    public void setWxUserId(Long wxUserId) {
        this.wxUserId = wxUserId;
    }
    
    public String getConsigneeName() {
        return consigneeName;
    }
    
    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }
    
    public String getConsigneePhone() {
        return consigneePhone;
    }
    
    public void setConsigneePhone(String consigneePhone) {
        this.consigneePhone = consigneePhone;
    }
    
    public String getConsigneeRegion() {
        return consigneeRegion;
    }
    
    public void setConsigneeRegion(String consigneeRegion) {
        this.consigneeRegion = consigneeRegion;
    }
    
    public String getConsigneeAddress() {
        return consigneeAddress;
    }
    
    public void setConsigneeAddress(String consigneeAddress) {
        this.consigneeAddress = consigneeAddress;
    }
    
    public BigDecimal getTotalAmount() {
        return totalAmount;
    }
    
    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }
    
    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }
    
    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }
    
    public BigDecimal getPayableAmount() {
        return payableAmount;
    }
    
    public void setPayableAmount(BigDecimal payableAmount) {
        this.payableAmount = payableAmount;
    }
    
    public String getPaymentMethod() {
        return paymentMethod;
    }
    
    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }
    
    public Date getPaymentTime() {
        return paymentTime;
    }
    
    public void setPaymentTime(Date paymentTime) {
        this.paymentTime = paymentTime;
    }
    
    public Date getPaymentCompletedTime() {
        return paymentCompletedTime;
    }
    
    public void setPaymentCompletedTime(Date paymentCompletedTime) {
        this.paymentCompletedTime = paymentCompletedTime;
    }
    
    public Date getShippingTime() {
        return shippingTime;
    }
    
    public void setShippingTime(Date shippingTime) {
        this.shippingTime = shippingTime;
    }
    
    public Date getDeliveryTime() {
        return deliveryTime;
    }
    
    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }
    
    public Integer getOrderStatus() {
        return orderStatus;
    }
    
    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }
    
    public String getCancelReason() {
        return cancelReason;
    }
    
    public void setCancelReason(String cancelReason) {
        this.cancelReason = cancelReason;
    }
    
    public Integer getRefundStatus() {
        return refundStatus;
    }
    
    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }
    
    public BigDecimal getRefundAmount() {
        return refundAmount;
    }
    
    public void setRefundAmount(BigDecimal refundAmount) {
        this.refundAmount = refundAmount;
    }
    
    public String getPromotionCode() {
        return promotionCode;
    }
    
    public void setPromotionCode(String promotionCode) {
        this.promotionCode = promotionCode;
    }
    
    public Integer getInvoiceType() {
        return invoiceType;
    }
    
    public void setInvoiceType(Integer invoiceType) {
        this.invoiceType = invoiceType;
    }
    
    public String getInvoiceInfo() {
        return invoiceInfo;
    }
    
    public void setInvoiceInfo(String invoiceInfo) {
        this.invoiceInfo = invoiceInfo;
    }
    
    public Integer getSourceChannel() {
        return sourceChannel;
    }
    
    public void setSourceChannel(Integer sourceChannel) {
        this.sourceChannel = sourceChannel;
    }
    
    public Integer getDelFlag() {
        return delFlag;
    }
    
    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
    
    public List<OrdOrderCommodity> getOrdOrderCommodityList() {
        return ordOrderCommodityList;
    }
    
    public void setOrdOrderCommodityList(List<OrdOrderCommodity> ordOrderCommodityList) {
        this.ordOrderCommodityList = ordOrderCommodityList;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("wxUserId", getWxUserId())
                .append("consigneeName", getConsigneeName())
                .append("consigneePhone", getConsigneePhone())
                .append("consigneeRegion", getConsigneeRegion())
                .append("consigneeAddress", getConsigneeAddress())
                .append("totalAmount", getTotalAmount())
                .append("discountAmount", getDiscountAmount())
                .append("payableAmount", getPayableAmount())
                .append("paymentMethod", getPaymentMethod())
                .append("paymentTime", getPaymentTime())
                .append("paymentCompletedTime", getPaymentCompletedTime())
                .append("shippingTime", getShippingTime())
                .append("deliveryTime", getDeliveryTime())
                .append("orderStatus", getOrderStatus())
                .append("cancelReason", getCancelReason())
                .append("refundStatus", getRefundStatus())
                .append("refundAmount", getRefundAmount())
                .append("promotionCode", getPromotionCode())
                .append("invoiceType", getInvoiceType())
                .append("invoiceInfo", getInvoiceInfo())
                .append("sourceChannel", getSourceChannel())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
